<%@ page language="java" 
    contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<table>
 <tr>
   <td><h1>千锋图书管理系统</h1></td> 
   <td>欢迎${loginedInfo.name}回来！</td> 
   <td><a href="${pageContext.request.contextPath}/admin?action=exit">退出</a></td>
 </tr>
</table>
<hr/>
	<table align='center' border='1px' width='50%' cellpadding='5px' cellspacing='0px' />
	<caption>
		<h1>图书管理系统</h1>
	</caption>
	<tr>
		<th>ID</th>
		<th>书名</th>
		<th>作者</th>
		<th>出版社</th>
		<th>价格</th>
		<th>上架时间</th>
		<th>操作<a href="${pageContext.request.contextPath}/pages/addBook.jsp">添加</a></th>
	</tr>
        <c:if test="${not empty list}">
        <c:forEach var="book" items="${list}">
	        <tr align='center'>
		   		<td>${book.bid}</td>
		   		<td>${book.name}</td>
		   		<td>${book.author}</td>
		   		<td>${book.publish}</td>
		   		<td>${book.price}</td>
		   		<td>${book.crtTime}</td>
		   		<td>
		   		<a href="${pageContext.request.contextPath}/book?action=upd&bid=${book.bid}">修改</a>/
		   		<a href="${pageContext.request.contextPath}/book?action=del&bid=${book.bid}">删除</a>
		   		</td>
	     	</tr>
        </c:forEach>
        </c:if>
    	
	</table>
	<table align="center">
	    <tr align="center">
    	  <td>
    	             当前1/10页
    	    <a href="">首页</a>
    	    <a href="">上一页</a>
    	    <a href="">下一页</a>
    	    <a href="">末页</a>         
    	  </td>
    	</tr>
	</table>
</body>
</html>